﻿
#include <iostream>
#include "../../xcom/xsock.hpp"
#include "../../xcom/xee.hpp"
#include "../../xcom/xcom.hpp"
int main(int argc, char** argv)
{
    while(1){
        auto begin = get_ns();
        int fd = open("./file_xxx",O_CREAT|O_RDWR|O_TRUNC,
                        S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
        if(-1 == fd){
            X_P_INFO;
        }

        auto cost = get_ns() - begin;
        
        if(cost > 1000*1000){
            auto now = time(nullptr);
            printf("[%s]open cost = %ju us\n",ctime(&now),cost/1000);
        }
        
        sleep_ms(100);
    }
    return 0;
}


